package v1

import (
	// "fmt" // Removed unused import
	"runtime"
	"wms/internal/service"
	"wms/pkg/common"

	// "wms/pkg/logger" // Removed unused import

	"github.com/gin-gonic/gin"
	// "go.uber.org/zap" // Removed unused import
)

// SystemController 系统控制器
type SystemController struct {
	systemService *service.SystemService
}

// NewSystemController 创建系统控制器
func NewSystemController() *SystemController {
	return &SystemController{
		systemService: service.NewSystemService(),
	}
}

// GetSystemInfo 获取系统信息
func (c *SystemController) GetSystemInfo(ctx *gin.Context) {

	// GetSystemInfo godoc
	// @Summary 获取系统信息
	// @Description 获取系统的基本信息，包括版本、运行环境等
	// @Tags 系统管理
	// @Accept json
	// @Produce json
	// @Security Bearer
	// @Success 200 {object} common.Response{data=map[string]interface{}} "成功"
	// @Failure 500 {object} common.Response "内部错误"
	// @Router /system/info [get]
	info := map[string]interface{}{
		"name":       "WMS仓库管理系统",
		"version":    "1.0.0",
		"go_version": runtime.Version(),
		"env":        "development",
		"os":         runtime.GOOS,
		"arch":       runtime.GOARCH,
	}

	common.Success(ctx, info)
}
